package com.truyen.persistence.entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the chapter_tmp_truyen_tranh database table.
 * 
 */
@Entity
@Table(name="chapter_tmp_truyen_tranh")
public class ChapterTmpTruyenTranh implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(unique=true, nullable=false)
	private long id;

	@Column(nullable=false, length=255)
	private String alias;

	private float chapterNumber;

	@Column(nullable=false, length=255)
	private String name;

	//bi-directional one-to-one association to ChapterTruyenTranh
	@OneToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="id", nullable=false, insertable=false, updatable=false)
	private ChapterTruyenTranh chapterTruyenTranh;

	//bi-directional many-to-one association to TruyenTranh
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="truyenTranhItem", nullable=false)
	private TruyenTranh truyenTranh;

	public ChapterTmpTruyenTranh() {
	}

	public ChapterTmpTruyenTranh(long id2, String name2,
			String alias2, float chapterNumber2, TruyenTranh truyen) {
		this.id=id2;
		this.name=name2;
		this.alias=alias2;
		this.chapterNumber=chapterNumber2;
		this.truyenTranh=truyen;
	}

	public long getId() {
		return this.id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getAlias() {
		return this.alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public float getChapterNumber() {
		return this.chapterNumber;
	}

	public void setChapterNumber(float chapterNumber) {
		this.chapterNumber = chapterNumber;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public ChapterTruyenTranh getChapterTruyenTranh() {
		return this.chapterTruyenTranh;
	}

	public void setChapterTruyenTranh(ChapterTruyenTranh chapterTruyenTranh) {
		this.chapterTruyenTranh = chapterTruyenTranh;
	}

	public TruyenTranh getTruyenTranh() {
		return this.truyenTranh;
	}

	public void setTruyenTranh(TruyenTranh truyenTranh) {
		this.truyenTranh = truyenTranh;
	}

}